package com.njy.aop.controller;


import com.njy.aop.annotation.SysLog;
import com.njy.aop.service.aopService;
import com.njy.pojo.OperationType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class aopController {

    @Autowired
    private aopService aopService;


    @GetMapping("/aop/{id}")
    public String AOP(@PathVariable(value = "id") String id){
        return aopService.aop(id);
    }


    @GetMapping("/aop1/{id}")
    @SysLog(description = "test1",operationType = OperationType.unknown)
    public String AOP1(@PathVariable(value = "id") String id){
        return aopService.aop1(id);
    }

}
